package com.arron.reflect;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @Classname StartProxy
 * @Date 2020/8/28 15:11
 * @Created by 刘
 */
public class StartProxy implements InvocationHandler {

    Start app;

    public StartProxy(Start app){
        this.app=app;
        System.out.println(app.getClass().getName());
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {

        method.invoke(app, args);

        return null;
    }
}
